﻿<!-- #include file="Include/Admin_Onlogin.asp" -->
<%
Dim sqlAuth, rsAuth, PurviewID
dim dbpath
dim ObjInstalled
dbpath=Server.MapPath(InstallDir & AccessDB)
ObjInstalled=IsObjInstalled(Trim(Fso_Sys))
Select Case Action
Case "BackupData"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Backup/Update' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call BackupData()
Case "Del"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Admin_DataBackup.asp?Action=Del' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call DelShowRestore()
Case "DelBackup"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Del/Update' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call DelBackup()
Case "Compact"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Admin_DataBackup.asp?Action=Compact' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call ShowCompact()
Case "CompactData"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Compact/Update' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call CompactData()
Case "Restore"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Admin_DataBackup.asp?Action=Restore' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call ShowRestore()
Case "RestoreData"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Restore/Update' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call RestoreData()
Case "Init"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Admin_DataBackup.asp?Action=Init' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call ShowInit()
Case "Clear"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Init/Update' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call ClearData()
Case "SpaceSize"
	sqlAuth = "Select AuthID From Admin_Auth Where href='Admin_DataBackup.asp?Action=SpaceSize' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call SpaceSize()
Case Else
	sqlAuth = "Select AuthID From Admin_Auth Where href='Admin_DataBackup.asp?Action=Backup' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call ShowBackup()
End Select
If FoundErr = True Then
	Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Call CloseConn()

Sub ShowBackup()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>数据库管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Response.Write "<form class='layui-form layui-form-pane' id=""myform"" name=""myform"" action='?Action=BackupData' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "        <legend>备份数据库</legend>" & vbCrlf
	Response.Write "    </fieldset>" & vbCrlf
	Response.Write "    <blockquote class=""layui-elem-quote"">" & vbCrlf
	Response.Write "        <a href=""?Action=Backup"" class=""layui-btn layui-btn-sm layui-btn-danger"">备份数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Restore"" class=""layui-btn layui-btn-sm"">恢复数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Del"" class=""layui-btn layui-btn-sm"">删除数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Compact"" class=""layui-btn layui-btn-sm"">压缩数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Init"" class=""layui-btn layui-btn-sm"">系统初始化</a>" & vbCrlf
	Response.Write "        <a href=""?Action=SpaceSize"" class=""layui-btn layui-btn-sm"">系统空间占用情况</a>" & vbCrlf
	Response.Write "    </blockquote>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <label class=""layui-form-label"">备份目录：</label>" & vbCrlf
	Response.Write "        <div class=""layui-input-4"">" & vbCrlf
	Response.Write "            <input id='bkfolder' name='bkfolder' type='text' value='" & DataBackPath & "' size='30' readonly=""readonly"" class=""layui-input"">" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <label class=""layui-form-label"">备份名称：</label>" & vbCrlf
	Response.Write "        <div class=""layui-input-3"">" & vbCrlf
	Response.Write "            <input type=""text"" size=""20"" id=""bkDBname"" name=""bkDBname"" value=""#WangKai_Cms_" & Time_Type(Now(),7) & "_Bak"" lay-verify=""bkDBname"" class=""layui-input"">" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "        <div class=""layui-input-t"">" & vbCrlf
	Response.Write "            后缀" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "        <div class=""layui-input-i"">" & vbCrlf
	Response.Write "            <div id=""backhouzhui_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:80px;""><input type=""text"" ztype=""select"" id=""backhouzhui"" name=""backhouzhui"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:80px;position:absolute;z-index:-1;"" value="".asa"" startvalue="".asa""/><input type=""text"" id=""backhouzhui_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:80px;"" /><a id=""backhouzhui_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""backhouzhui_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""backhouzhui_ul"" style=""left:-1px; width:-1px;""><script>Combox_backhouzhui_Init=function(){var _el=Zving.getDom('backhouzhui');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['.asa','.asa']);_data.push(['.mdb','.mdb']);_data.push(['.asp','.asp']);var combox_backhouzhui = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_backhouzhui_Init();}else{Zving.Page.onReady(Combox_backhouzhui_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <div class=""layui-input-block"">" & vbCrlf
	Response.Write "            <input name=""Action"" type=""hidden"" id=""Action"" value=""BackupData"">" & vbCrlf
	Response.Write "            <button type=""button"" class=""layui-btn"" accesskey=""s"" lay-submit="""" lay-filter=""submit"""
	If ObjInstalled=False Then Response.Write " disabled"
	Response.Write ">开始备份[S]</button>" & vbCrlf
	Response.Write "            <button type=""reset"" class=""layui-btn layui-btn-danger"" accesskey=""r"">重置[R]</button>" & vbCrlf
	If ObjInstalled=False Then
		Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
	End If
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //自定义表单验证" & vbCrlf
	Response.Write "    form.verify({" & vbCrlf
	Response.Write "        bkDBname: function (value, item) {" & vbCrlf
	Response.Write "            if (!value){" & vbCrlf
	Response.Write "                item.focus();" & vbCrlf
	Response.Write "                return ""备份名称不能为空！"";" & vbCrlf
	Response.Write "            }" & vbCrlf
	Response.Write "        }," & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=BackupData'," & vbCrLf
	Response.Write "            data: data.field," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        location.href = res.url;" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub ShowCompact()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>数据库管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Response.Write "<form class='layui-form layui-form-pane' id=""myform"" name=""myform"" action='?Action=CompactData' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "        <legend>压缩数据库</legend>" & vbCrlf
	Response.Write "    </fieldset>" & vbCrlf
	Response.Write "    <blockquote class=""layui-elem-quote"">" & vbCrlf
	Response.Write "        <a href=""?Action=Backup"" class=""layui-btn layui-btn-sm"">备份数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Restore"" class=""layui-btn layui-btn-sm"">恢复数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Del"" class=""layui-btn layui-btn-sm"">删除数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Compact"" class=""layui-btn layui-btn-sm layui-btn-danger"">压缩数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Init"" class=""layui-btn layui-btn-sm"">系统初始化</a>" & vbCrlf
	Response.Write "        <a href=""?Action=SpaceSize"" class=""layui-btn layui-btn-sm"">系统空间占用情况</a>" & vbCrlf
	Response.Write "    </blockquote>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <label class=""layui-form-label"">数据库路径</label>" & vbCrlf
	Response.Write "        <div class=""layui-input-4"">" & vbCrlf
	Response.Write "            <div id=""dbpath_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:200px;""><input type=""text"" ztype=""select"" id=""dbpath"" name=""dbpath"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:200px;position:absolute;z-index:-1;"" value=""" & InstallDir & AccessDB & """ startvalue=""" & InstallDir & AccessDB & """/><input type=""text"" id=""dbpath_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:200px;"" /><a id=""dbpath_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""dbpath_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""dbpath_ul"" style=""left:-1px; width:-1px;""><script>Combox_dbpath_Init=function(){var _el=Zving.getDom('dbpath');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['" & InstallDir & AccessDB & "','---请选择数据库文件---']);"
	Dim Fso
	Set Fso=CreateObject(Trim(Fso_Sys))
	dim theFolder,theFile,strFileType
	If Not Fso.FolderExists(Server.MapPath(DataBackPath)) Then
	Else
		Set theFolder=Fso.GetFolder(Server.MapPath(DataBackPath))
		For Each theFile In theFolder.Files
			strFileType=lcase(mid(theFile.Name,instrrev(theFile.Name,".")+1))
			If strFileType="asa" Or strFileType="mdb" Or strFileType="asp" Then
				Response.Write "_data.push(['" & DataBackPath & "/" & theFile.Name & "','" & theFile.Name & "']);"
			End If
		Next
	End if
	Response.Write "var combox_dbpath = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_dbpath_Init();}else{Zving.Page.onReady(Combox_dbpath_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <div class=""layui-input-block"">" & vbCrlf
	Response.Write "            <input name=""Action"" type=""hidden"" id=""Action"" value=""CompactData"">" & vbCrlf
	Response.Write "            <button type=""button"" class=""layui-btn"" accesskey=""s"" lay-submit="""" lay-filter=""submit"""
	If ObjInstalled=False Then Response.Write " disabled"
	Response.Write ">压缩数据库[S]</button>" & vbCrlf
	Response.Write "            <button type=""reset"" class=""layui-btn layui-btn-danger"" accesskey=""r"">重置[R]</button>" & vbCrlf
	If ObjInstalled=False Then
		Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
	End If
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=CompactData'," & vbCrLf
	Response.Write "            data: data.field," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        location.href = res.url;" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub ShowRestore()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>数据库管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Response.Write "<form class='layui-form layui-form-pane' id=""myform"" name=""myform"" action='?Action=RestoreData' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "        <legend>恢复数据库</legend>" & vbCrlf
	Response.Write "    </fieldset>" & vbCrlf
	Response.Write "    <blockquote class=""layui-elem-quote"">" & vbCrlf
	Response.Write "        <a href=""?Action=Backup"" class=""layui-btn layui-btn-sm"">备份数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Restore"" class=""layui-btn layui-btn-sm layui-btn-danger"">恢复数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Del"" class=""layui-btn layui-btn-sm"">删除数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Compact"" class=""layui-btn layui-btn-sm"">压缩数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Init"" class=""layui-btn layui-btn-sm"">系统初始化</a>" & vbCrlf
	Response.Write "        <a href=""?Action=SpaceSize"" class=""layui-btn layui-btn-sm"">系统空间占用情况</a>" & vbCrlf
	Response.Write "    </blockquote>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <label class=""layui-form-label"">备份路径：</label>" & vbCrlf
	Response.Write "        <div class=""layui-input-4"">" & vbCrlf
	Dim Fso
	Set Fso=CreateObject(Trim(Fso_Sys))
	dim theFolder,theFile,strFileType
	If Not Fso.FolderExists(Server.MapPath(DataBackPath)) Then
		Response.Write "找不到数据库备份文件夹（" & DataBackPath & "）！请重试!"
		Response.End()
	End If
	Response.Write "            <div id=""backpath_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:200px;""><input type=""text"" ztype=""select"" id=""backpath"" name=""backpath"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:200px;position:absolute;z-index:-1;"" value="""" startvalue=""""/><input type=""text"" id=""backpath_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:200px;"" /><a id=""backpath_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""backpath_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""backpath_ul"" style=""left:-1px; width:-1px;""><script>Combox_backpath_Init=function(){var _el=Zving.getDom('backpath');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['','---请选择备份的数据库文件---']);"
	Set theFolder=Fso.GetFolder(Server.MapPath(DataBackPath))
	For Each theFile In theFolder.Files
		strFileType=lcase(mid(theFile.Name,instrrev(theFile.Name,".")+1))
		If strFileType="asa" Or strFileType="mdb" Or strFileType="asp" Then
			Response.Write "_data.push(['" & DataBackPath & "/" & theFile.Name & "','" & theFile.Name & "']);"
		End If
	Next
	Response.Write "var combox_backpath = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_backpath_Init();}else{Zving.Page.onReady(Combox_backpath_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <div class=""layui-input-block"">" & vbCrlf
	Response.Write "            <input name=""Action"" type=""hidden"" id=""Action"" value=""RestoreData"">" & vbCrlf
	Response.Write "            <button type=""button"" class=""layui-btn"" accesskey=""s"" lay-submit="""" lay-filter=""submit"""
	If ObjInstalled=False Then Response.Write " disabled"
	Response.Write ">恢复数据[S]</button>" & vbCrlf
	Response.Write "            <button type=""reset"" class=""layui-btn layui-btn-danger"" accesskey=""r"">重置[R]</button>" & vbCrlf
	If ObjInstalled=False Then
		Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
	End If
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=RestoreData'," & vbCrLf
	Response.Write "            data: data.field," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        location.href = res.url;" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub DelShowRestore()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>数据库管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Response.Write "<form class='layui-form layui-form-pane' id=""myform"" name=""myform"" action='?Action=DelBackup' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "        <legend>删除数据库</legend>" & vbCrlf
	Response.Write "    </fieldset>" & vbCrlf
	Response.Write "    <blockquote class=""layui-elem-quote"">" & vbCrlf
	Response.Write "        <a href=""?Action=Backup"" class=""layui-btn layui-btn-sm"">备份数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Restore"" class=""layui-btn layui-btn-sm"">恢复数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Del"" class=""layui-btn layui-btn-sm layui-btn-danger"">删除数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Compact"" class=""layui-btn layui-btn-sm"">压缩数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Init"" class=""layui-btn layui-btn-sm"">系统初始化</a>" & vbCrlf
	Response.Write "        <a href=""?Action=SpaceSize"" class=""layui-btn layui-btn-sm"">系统空间占用情况</a>" & vbCrlf
	Response.Write "    </blockquote>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <label class=""layui-form-label"">备份路径：</label>" & vbCrlf
	Response.Write "        <div class=""layui-input-4"">" & vbCrlf
	Dim Fso
	Set Fso=CreateObject(Trim(Fso_Sys))
	dim theFolder,theFile,strFileType
	if Not Fso.FolderExists(Server.MapPath(DataBackPath)) Then
		Response.Write "找不到数据库备份文件夹（" & DataBackPath & "）！请重试!"
		Response.End()
	End If
	Response.Write "            <div id=""Document_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:200px;""><input type=""text"" ztype=""select"" id=""Document"" name=""Document"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:200px;position:absolute;z-index:-1;"" value="""" startvalue=""""/><input type=""text"" id=""Document_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:200px;"" /><a id=""Document_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""Document_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""Document_ul"" style=""left:-1px; width:-1px;""><script>Combox_Document_Init=function(){var _el=Zving.getDom('Document');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['','---请选择备份的数据库文件---']);"
	Set theFolder=Fso.GetFolder(Server.MapPath(DataBackPath))
	For Each theFile In theFolder.Files
		strFileType=lcase(mid(theFile.Name,instrrev(theFile.Name,".")+1))
		If strFileType="asa" Or strFileType="mdb" Or strFileType="asp" Then
			Response.Write "_data.push(['" & DataBackPath & "/" & theFile.Name & "','" & theFile.Name & "']);"
		End If
	Next
	Response.Write "var combox_Document = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_Document_Init();}else{Zving.Page.onReady(Combox_Document_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <div class=""layui-input-block"">" & vbCrlf
	Response.Write "            <input name=""Action"" type=""hidden"" id=""Action"" value=""DelBackup"">" & vbCrlf
	Response.Write "            <button type=""button"" class=""layui-btn"" accesskey=""s"" lay-submit="""" lay-filter=""submit"""
	If ObjInstalled=False Then Response.Write " disabled"
	Response.Write ">删除备份[S]</button>" & vbCrlf
	Response.Write "            <button type=""reset"" class=""layui-btn layui-btn-danger"" accesskey=""r"">重置[R]</button>" & vbCrlf
	If ObjInstalled=False Then
		Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
	End If
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=DelBackup'," & vbCrLf
	Response.Write "            data: data.field," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        location.href = res.url;" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub ShowInit()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>数据库管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Response.Write "<form class='layui-form layui-form-pane' id=""myform"" name=""myform"" action='?Action=Clear' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "        <legend>系统初始化</legend>" & vbCrlf
	Response.Write "    </fieldset>" & vbCrlf
	Response.Write "    <blockquote class=""layui-elem-quote"">" & vbCrlf
	Response.Write "        <a href=""?Action=Backup"" class=""layui-btn layui-btn-sm"">备份数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Restore"" class=""layui-btn layui-btn-sm"">恢复数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Del"" class=""layui-btn layui-btn-sm"">删除数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Compact"" class=""layui-btn layui-btn-sm"">压缩数据库</a>" & vbCrlf
	Response.Write "        <a href=""?Action=Init"" class=""layui-btn layui-btn-sm layui-btn-danger"">系统初始化</a>" & vbCrlf
	Response.Write "        <a href=""?Action=SpaceSize"" class=""layui-btn layui-btn-sm"">系统空间占用情况</a>" & vbCrlf
	Response.Write "    </blockquote>" & vbCrlf
	Response.Write "    <fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "        <legend><input name='chkAll' type='checkbox' id='chkAll' value='on' title='全选' lay-skin='primary' lay-filter='chkAll'>&nbsp;<b><font color=""#FF0000"">请慎用此功能，因为一旦清除将无法恢复！</font></b></legend>" & vbCrlf
	Response.Write "        <div class=""layui-field-box"">" & vbCrlf
	sql = "select ChannelID,ChannelName from Channel Where ChannelType<=1 Order By ChannelOrder,ChannelID Asc"
	Call Exec(rs,sql,2)
	Do while not Rs.eof
		Response.Write "            <fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend>" & rs("ChannelName") & "模型</legend>" & vbCrlf
		Response.Write "                <div class=""layui-field-box"">" & vbCrlf
		Response.Write "                    <div class=""layui-form-item"">" & vbCrlf
		Response.Write "                        <div class=""layui-block"">" & vbCrlf
		Response.Write "                            <input id=""AllClass"" name=""AllClass"" type=""checkbox"" value=""" & rs("ChannelID") & """ title=""" & rs("ChannelName") & "栏目"" class='rules' lay-skin='primary' lay-filter='c_one'>" & vbCrlf
		Response.Write "                            <input id=""AllInfo"" name=""AllInfo"" type=""checkbox"" value=""" & rs("ChannelID") & """ title=""所有" & rs("ChannelName") & """ class='rules' lay-skin='primary' lay-filter='c_one'>" & vbCrlf
		Response.Write "                        </div>" & vbCrlf
		Response.Write "                    </div>" & vbCrlf
		Response.Write "                </div>" & vbCrlf
		Response.Write "            </fieldset>" & vbCrlf
		Rs.MoveNext
	Loop
	Set Rs=Nothing
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </fieldset>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "    <div class=""layui-form-item"">" & vbCrlf
	Response.Write "        <div class=""layui-input-block"">" & vbCrlf
	Response.Write "            <input name=""Action"" type=""hidden"" id=""Action"" value=""Clear"">" & vbCrlf
	Response.Write "            <button type=""button"" class=""layui-btn"" accesskey=""s"" lay-submit="""" lay-filter=""submit"">清除数据[S]</button>" & vbCrlf
	Response.Write "            <button type=""reset"" class=""layui-btn layui-btn-danger"" accesskey=""r"">重置[R]</button>" & vbCrlf
	Response.Write "        </div>" & vbCrlf
	Response.Write "    </div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //监听 权限全选" & vbCrlf
	Response.Write "    form.on('checkbox(chkAll)', function (data) {" & vbCrlf
	Response.Write "        var a = data.elem.checked;" & vbCrlf
	Response.Write "        if (a == true) {" & vbCrlf
	Response.Write "            $('.rules').prop('checked', true);" & vbCrlf
	Response.Write "            form.render('checkbox');" & vbCrlf
	Response.Write "        } else {" & vbCrlf
	Response.Write "            $('.rules').prop('checked', false);" & vbCrlf
	Response.Write "            form.render('checkbox');" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //有一个未选中全选取消选中" & vbCrlf
	Response.Write "    form.on('checkbox(c_one)', function (data) {" & vbCrlf
	Response.Write "        var item = $('.rules');" & vbCrlf
	Response.Write "        for (var i = 0; i < item.length; i++) {" & vbCrlf
	Response.Write "            if (item[i].checked == false) {" & vbCrlf
	Response.Write "                $('#chkAll').prop('checked', false);" & vbCrlf
	Response.Write "                form.render('checkbox');" & vbCrlf
	Response.Write "                break;" & vbCrlf
	Response.Write "            }" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "        //如果都勾选了  勾上全选" & vbCrlf
	Response.Write "        var  all=item.length;" & vbCrlf
	Response.Write "        for (var i = 0; i < item.length; i++) {" & vbCrlf
	Response.Write "            if (item[i].checked == true) {" & vbCrlf
	Response.Write "                all--;" & vbCrlf
	Response.Write "            }" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "        if(all==0){" & vbCrlf
	Response.Write "            $('#chkAll').prop('checked', true);" & vbCrlf
	Response.Write "            form.render('checkbox');" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=Clear'," & vbCrLf
	Response.Write "            data: data.field," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        location.href = res.url;" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub SpaceSize()
	Dim s_system,sys_path,sys_num_folder,sys_num_file,sys_cdate
	Dim Fso,obj,obj2,tmp1,tmp2
	If IsObjInstalled(Fso_Sys) Then
		On Error Resume Next
		tmp1=server.mappath(InstallDir)
		Set Fso=server.createobject(Fso_Sys)
		Set obj=Fso.getfolder(tmp1)
		s_system=obj.size
		sys_path=tmp1
		sys_num_folder=obj.subfolders.count
		sys_num_file=obj.files.count
		sys_cdate=obj.datecreated
		s_pro=0
		set obj2=obj.files
		For Each tmp2 In obj2
			s_pro=s_pro+tmp2.size
		Next
		Set obj2=nothing
		Set obj=nothing
		If Err Then Err.Clear
		Response.Write "<!DOCTYPE html>" & vbCrLf
		Response.Write "<head>" & vbCrLf
		Response.Write "<title>数据库管理</title>" & vbCrlf
		Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
		Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
		Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
		Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
		Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
		Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
		Response.Write "<link href='Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
		Response.Write "<link href='Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
		Response.Write "<link href='Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
		Response.Write "<script type='text/javascript'>" & vbCrLf
		Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
		Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='Js/Admin.js'></script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../Dialog/main.js'></script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../Dialog/lhgcore.min.js'></script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
		Response.Write "<script type=""text/javascript"" src=""Plugins/layui/layui.js""></script>" & vbCrLf
		Response.Write "</head>" & vbCrlf
		Response.Write "<body>" & vbCrlf
		Response.Write "<form class='layui-form layui-form-pane' id=""myform"" name=""myform"">" & vbCrlf
		Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
		Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
		Response.Write "        <legend>系统空间占用情况</legend>" & vbCrlf
		Response.Write "    </fieldset>" & vbCrlf
		Response.Write "    <blockquote class=""layui-elem-quote"">" & vbCrlf
		Response.Write "        <a href=""?Action=Backup"" class=""layui-btn layui-btn-sm"">备份数据库</a>" & vbCrlf
		Response.Write "        <a href=""?Action=Restore"" class=""layui-btn layui-btn-sm"">恢复数据库</a>" & vbCrlf
		Response.Write "        <a href=""?Action=Del"" class=""layui-btn layui-btn-sm"">删除数据库</a>" & vbCrlf
		Response.Write "        <a href=""?Action=Compact"" class=""layui-btn layui-btn-sm"">压缩数据库</a>" & vbCrlf
		Response.Write "        <a href=""?Action=Init"" class=""layui-btn layui-btn-sm"">系统初始化</a>" & vbCrlf
		Response.Write "        <a href=""?Action=SpaceSize"" class=""layui-btn layui-btn-sm layui-btn-danger"">系统空间占用情况</a>" & vbCrlf
		Response.Write "    </blockquote>" & vbCrlf
		Response.Write "<div class=""table-responsive"">" & vbCrLf
		Response.Write "<table class=""layui-table table-hover"">" & vbCrlf
		Response.Write "<tr class=""title"">" & vbCrlf
		Response.Write "<td align=""center"" colspan=3><b>系统空间占用情况</b></td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td colspan=3><img border=""0"" src='Images/z9.png' align=""absmiddle"" onmouseover=""layer.tips('物理路径：" & sys_path & "<br>创建时间：" & sys_cdate & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();"">&nbsp;<a onmouseover=""layer.tips('物理路径：" & sys_path & "<br>创建时间：" & sys_cdate & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();"">系统目录</a>占用空间总量为 " & Byte_Size(s_system) & "，共有 <font class=red>" & sys_num_folder & "</font> 个文件夹，<font class=red>" & sys_num_file & "</font> 个文件，其中：</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;系统程序占用空间：</td><td width=""20%"">" & ShowSpace("Include",1) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;数 据 库占用空间：</td><td width=""20%"">" & ShowSpace("Database",2) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;系统图片占用空间：</td><td width=""20%"">" & ShowSpace("Images",3) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;网站Skin占用空间：</td><td width=""20%"">" & ShowSpace("Skin",4) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;网站模板占用空间：</td><td width=""20%"">" & ShowSpace("Templates",5) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;ＪＳ文件占用空间：</td><td width=""20%"">" & ShowSpace("Style",6) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;上传文件占用空间：</td><td width=""20%"">" & ShowSpace("Upload",7) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		sql = "select * from Channel where ChannelType<=1 Order By ChannelOrder Asc,ChannelID Desc"
		Call Exec(rs,sql,2)
		Do While Not Rs.Eof
			Response.Write "<tr>" & vbCrlf
			Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;" & rs("ChannelName") & "文件占用空间：</td><td width=""20%"">" & ShowSpace(rs("ChannelDir"),rs("ModuleType")) & "</td>" & vbCrlf
			Response.Write "</tr>" & vbCrlf
			Rs.MoveNext
		Loop
		Rs.Close
		Set rs = Nothing
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;其它文件占用空间：</td><td width=""20%"">" & ShowSpace(AdminFolder&"|Countpic|Dialog|UEditor|Jqqonline",8) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "<tr>" & vbCrlf
		Response.Write "<td width=""20%""><img border=""0"" src='Images/tree_folder1.png' align=""absmiddle"">&nbsp;网站占用空间总计：</td><td width=""20%"">" & ShowSpace(" ",9) & "</td>" & vbCrlf
		Response.Write "</tr>" & vbCrlf
		Response.Write "</table>" & vbCrlf
		Response.Write "</div>" & vbCrLf
	Else
		Response.Write vbcrlf&"<img border=""0"" src='Images/tree_folder1.png'>&nbsp;您的空间不支持 FSO 文本文件读写，因此不能进行此项检测！"
	End If
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub BackupData()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		dim bkfolder,bkdbname,backhouzhui,Fso
		bkfolder=trim(request("bkfolder"))
		bkdbname=trim(request("bkdbname"))
		backhouzhui=trim(request("backhouzhui"))
		if bkfolder="" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6307\u5b9a\u5907\u4efd\u76ee\u5f55\uff01""}" & vbCrLf
			Response.End()
		end if
		if bkdbname="" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6307\u5b9a\u5907\u4efd\u6587\u4ef6\u540d\uff01""}" & vbCrLf
			Response.End()
		end if
		if backhouzhui="" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6307\u5b9a\u5907\u4efd\u6587\u4ef6\u540d\u540e\u7f00\uff01""}" & vbCrLf
			Response.End()
		end if
		If FoundErr=True Then Exit Sub
		bkfolder=server.MapPath(bkfolder)
		Set Fso=server.createobject(Trim(Fso_Sys))
		If Fso.FileExists(dbpath) Then
			If Fso.FolderExists(bkfolder)=false Then
				Fso.CreateFolder(bkfolder)
			end if
			Fso.copyfile dbpath,bkfolder & "\" & bkdbname & backhouzhui
			Response.Write "{""code"":1,""msg"":""\u5907\u4efd\u6570\u636e\u5e93\u6210\u529f\uff01"",""url"":""?Action=Backup""}" & vbCrLf
			Response.End()
		Else
			Response.Write "{""code"":0,""msg"":""\u627e\u4e0d\u5230\u6e90\u6570\u636e\u5e93\u6587\u4ef6\uff0c\u8bf7\u68c0\u67e5..\/Include\/Conn.asp\u4e2d\u7684\u914d\u7f6e\u3002""}" & vbCrLf
			Response.End()
		End If
	End If
End Sub

Sub CompactData()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim Fso, Engine, strDBPath
		dbpath=Trim(request("dbpath"))
		if dbpath="" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u8f93\u5165\u8981\u538b\u7f29\u7684\u6570\u636e\u5e93\u8def\u5f84\uff01""}" & vbCrLf
			Response.End()
			Exit Sub
		else
			dbpath=Server.MapPath(dbpath)	
		end if
		strDBPath = left(dbPath,instrrev(DBPath,"\"))
		Set Fso = Server.CreateObject(Trim(Fso_Sys))
		If Fso.FileExists(dbPath) Then
			Fso.CopyFile dbpath, strDBPath & "temp.mdb"
			Set Engine = CreateObject("JRO.JetEngine")
				Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb", _
					"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp1.mdb"
			Fso.CopyFile strDBPath & "temp1.mdb", dbpath
			Fso.DeleteFile(strDBPath & "temp.mdb")
			Fso.DeleteFile(strDBPath & "temp1.mdb")
			Set Fso = nothing
			Set Engine = nothing
			Response.Write "{""code"":1,""msg"":""\u6570\u636e\u5e93\u538b\u7f29\u6210\u529f\uff01"",""url"":""?Action=Compact""}" & vbCrLf
			Response.End()
		Else
			Response.Write "{""code"":0,""msg"":""\u6570\u636e\u5e93\u6ca1\u6709\u627e\u5230\uff01""}" & vbCrLf
			Response.End()
		End If
	End If
End Sub

Sub RestoreData()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		dim backpath,Fso
		backpath=request.form("backpath")
		if backpath="" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6307\u5b9a\u539f\u5907\u4efd\u7684\u6570\u636e\u5e93\u6587\u4ef6\u540d\uff01""}" & vbCrLf
			Response.End()
			Exit Sub	
		end if
		backpath=server.mappath(backpath)
		Set Fso=server.createobject(Trim(Fso_Sys))
		if Fso.fileexists(backpath) Then  					
			Fso.copyfile Backpath,Dbpath
			Response.Write "{""code"":1,""msg"":""\u6210\u529f\u6062\u590d\u6570\u636e\uff01"",""url"":""?Action=Restore""}" & vbCrLf
			Response.End()
		else
			Response.Write "{""code"":0,""msg"":""\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u5907\u4efd\u6587\u4ef6\uff01""}" & vbCrLf
			Response.End()
		end if
	End If
End Sub

Sub DelBackup()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		dim Back,Fso
		Back=request.form("Document")
		if Back="" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6307\u5b9a\u539f\u5907\u4efd\u7684\u6570\u636e\u5e93\u6587\u4ef6\u540d\uff01""}" & vbCrLf
			Response.End()
			Exit Sub	
		end if
		Back=server.mappath(Back)
		Set Fso=server.createobject(Trim(Fso_Sys))
		if Fso.fileexists(Back) Then  					
			Fso.DeleteFile Back, True '强制删除只读文件
			Response.Write "{""code"":1,""msg"":""\u6210\u529f\u5220\u9664\u6570\u636e\u5e93\uff01"",""url"":""?Action=Del""}" & vbCrLf
			Response.End()
		else
			Response.Write "{""code"":0,""msg"":""\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u5907\u4efd\u6587\u4ef6\uff01""}" & vbCrLf
			Response.End()
		end if
	End If
End Sub

Sub ClearData()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		dim z, sClass, sInfo, sSpecial, sComment, sTempID, sqlDel, rsDel, StrDownloadUrl, Cfs
		sClass      = Replace(Trim(request("AllClass"))," ","")
		sInfo       = Replace(Trim(request("AllInfo"))," ","")
		z=0
		if sClass<>"" and IsNumeric(Replace(sClass,",","")) Then
			sTempID=Split(sClass,",")
			For i=0 to Ubound(sTempID)
				Call GetChannel(Clng(sTempID(i)))
				sqlDel = "select UploadFiles From " & ChannelDataName & " where ChannelID="&Clng(sTempID(i))
				Call Exec(rsDel,sqlDel,2)
				Do While Not rsDel.EOF
					If rsDel("UploadFiles")<>"" Then
						StrDownloadUrl=Trim(Replace(rsDel("UploadFiles"),"{$download_dir}",InstallDir&UploadSetting(1)))
						If Instr(StrDownloadUrl,"@@@") >0 Then
							StrDownloadUrl=Split(StrDownloadUrl,"@@@")
							For j=0 to Ubound(StrDownloadUrl)
								Set Cfs=New Cls_FileSystem
								Cfs.Del_File(StrDownloadUrl(i))
								Set Cfs=Nothing
							Next
						Else
							Set Cfs=New Cls_FileSystem
							Cfs.Del_File(StrDownloadUrl)
							Set Cfs=Nothing
						End If
					End If
					rsDel.MoveNext
				Loop
				rsDel.Close
				Set rsDel = Nothing
				Call Exec("","delete From " & ChannelDataName & " where ChannelID="&Clng(sTempID(i))&"",0)
				Call Exec("","delete From Class where ChannelID="&Clng(sTempID(i))&"",0)
				Msg=Msg & "\u6210\u529f\u6e05\u9664\u4e86\u9009\u5b9a\u6a21\u578bID\u4e3a "&Clng(sTempID(i))&" \u7684\u680f\u76ee\uff01"
				response.Flush
				z=z+1
			Next
		end if
		if sInfo<>"" and IsNumeric(Replace(sInfo,",","")) Then
			sTempID=Split(sInfo,",")
			For i=0 to Ubound(sTempID)
				Call GetChannel(Clng(sTempID(i)))
				sqlDel = "select UploadFiles From " & ChannelDataName & " where ChannelID="&Clng(sTempID(i))
				Call Exec(rsDel,sqlDel,2)
				Do While Not rsDel.EOF
					If rsDel("UploadFiles")<>"" Then
						StrDownloadUrl=Trim(Replace(rsDel("UploadFiles"),"{$download_dir}",InstallDir&UploadSetting(1)))
						If Instr(StrDownloadUrl,"@@@") >0 Then
							StrDownloadUrl=Split(StrDownloadUrl,"@@@")
							For j=0 to Ubound(StrDownloadUrl)
								Set Cfs=New Cls_FileSystem
								Cfs.Del_File(StrDownloadUrl(i))
								Set Cfs=Nothing
							Next
						Else
							Set Cfs=New Cls_FileSystem
							Cfs.Del_File(StrDownloadUrl)
							Set Cfs=Nothing
						End If
					End If
					rsDel.MoveNext
				Loop
				rsDel.Close
				Set rsDel = Nothing
				Call Exec("","delete From " & ChannelDataName & " where ChannelID="&Clng(sTempID(i))&"",0)
				Msg=Msg & "\u6210\u529f\u6e05\u9664\u4e86\u9009\u5b9a\u6a21\u578bID\u4e3a "&Clng(sTempID(i))&" \u7684\u5185\u5bb9\uff01"
				response.Flush
				z=z+1
			Next
		end if
		if z>0 Then
			Response.Write "{""code"":1,""msg"":""" & Msg & "<br>" & cstr(z) & "\u4e2a\u6570\u636e\u5e93\u88ab\u6e05\u7a7a\uff0c\u4f60\u53ef\u4ee5\u5f00\u59cb\u6dfb\u52a0\u65b0\u5185\u5bb9\u3002"",""url"":""?Action=Init""}" & vbCrLf
			Response.End()
		else
			Response.Write "{""code"":0,""msg"":""\u4f60\u6ca1\u6709\u9009\u62e9\u4efb\u4f55\u6570\u636e\u5e93\uff0c0\u4e2a\u6570\u636e\u5e93\u88ab\u6e05\u7a7a\u3002""}" & vbCrLf
			Response.End()
		end if
	End If
End Sub

Function Byte_Size(svar)
	Dim temp1
	if svar>=1073741824 Then
		temp1=int((svar/1073741824)*1000)/1000 & "</font> GB"
	elseif svar>=1048576 Then
		temp1=int((svar/1048576)*1000)/1000 & "</font> MB"
	elseif svar>=1024 Then
		temp1=int((svar/1024)*1000)/1000 & "</font> KB"
	else
		temp1=svar & "</font> B"
	End If
	Byte_Size="<font class=red>"&temp1
End Function

Function ShowSpace(FolderPath,bnum)
	Dim ft, fd, fs, TotalSize, SpaceSize, FolderBarWidth, arrPath, strSize, i, objFSO
	Set objFSO=Server.CreateObject(Fso_Sys)
	Set ft = objFSO.GetFolder(Server.MapPath(InstallDir))
	TotalSize = ft.size
	If TotalSize = 0 Then TotalSize = 1

	SpaceSize = 0
	arrPath = Split(FolderPath, "|")
	For i = 0 To UBound(arrPath)
		If arrPath(i) = "SiteRoot" Then
			Set fd = objFSO.GetFolder(Server.MapPath(InstallDir))
			For Each fs In fd.Files
				SpaceSize = SpaceSize + fs.size
			Next
		Else
			If objFSO.FolderExists(Server.MapPath(InstallDir & arrPath(i))) Then
				Set fd = objFSO.GetFolder(Server.MapPath(InstallDir & arrPath(i)))
				SpaceSize = SpaceSize + fd.size
			End If
		End If
	Next
	FolderBarWidth = (SpaceSize / TotalSize)

	strSize = SpaceSize & "&nbsp;Byte"
	If SpaceSize > 1024 Then
	   SpaceSize = (SpaceSize / 1024)
	   strSize = FormatNumber(SpaceSize, 2, vbTrue, vbFalse, vbTrue) & "&nbsp;KB"
	End If
	If SpaceSize > 1024 Then
	   SpaceSize = (SpaceSize / 1024)
	   strSize = FormatNumber(SpaceSize, 2, vbTrue, vbFalse, vbTrue) & "&nbsp;MB"
	End If
	If SpaceSize > 1024 Then
	   SpaceSize = (SpaceSize / 1024)
	   strSize = FormatNumber(SpaceSize, 2, vbTrue, vbFalse, vbTrue) & "&nbsp;GB"
	End If
	ShowSpace = strSize & "</td><td>"&formatpercent(FolderBarWidth,2)&"&nbsp;<img src='Images/vb"&bnum&".gif' width='" & formatnumber(360*FolderBarWidth,2) & "' height='10' onmouseover=""layer.tips('" & FolderPath & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();"">"
End Function
%>